home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / hf^k-2.dms / in.adf / MUIClass.Lha / Include / Classes / TWiMUI / Numeric.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-06  |  2.7 KB  |  71 lines

  1. //
  2. //  $VER: Numeric.h     1.2 (02 Sep 1996)
  3. //
  4. //    c 1996 Thomas Wilhelmi
  5. //
  6. //
  7. // Address : Taunusstrasse 14
  8. //           61138 Niederdorfelden
  9. //           Germany
  10. //
  11. //  E-Mail : willi@twi.rhein-main.de
  12. //
  13. //   Phone : +49 (0)6101 531060
  14. //   Fax   : +49 (0)6101 531061
  15. //
  16. //
  17. //  $HISTORY:
  18. //
  19. //  16 Jun 1996 :   1.0 : first public Release
  20. //
  21. //  02 Sep 1996 :   1.2 : Neu:
  22. //                        - ClassNum() für Exception-Handling.
  23. //                        Änderungen
  24. //                        - Parameter des Copy-Konstruktor als 'const'-Parameter definiert
  25. //
  26.  
  27. #ifndef CPP_TWIMUI_NUMERIC_H
  28. #define CPP_TWIMUI_NUMERIC_H
  29.  
  30. #ifndef CPP_TWIMUI_AREA_H
  31. #include <classes/twimui/area.h>
  32. #endif
  33.  
  34. class MUINumeric : public MUIArea
  35.     {
  36.     protected:
  37.         virtual const ULONG ClassNum() const;
  38.         MUINumeric(STRPTR cl) : MUIArea(cl) { };
  39.     public:
  40.         MUINumeric(const struct TagItem *t) : MUIArea(MUIC_Numeric) { init(t); };
  41.         MUINumeric(const Tag, ...);
  42.         MUINumeric() : MUIArea(MUIC_Numeric) { };
  43.         MUINumeric(const MUINumeric &);
  44.         virtual ~MUINumeric();
  45.         MUINumeric &operator= (const MUINumeric &);
  46.         void Default(const LONG p) { set(MUIA_Numeric_Default,(ULONG)p); };
  47.         LONG Default() const { return((LONG)get(MUIA_Numeric_Default,0L)); };
  48.         void Format(const STRPTR p) { set(MUIA_Numeric_Format,(ULONG)p); };
  49.         STRPTR Format() const { return((STRPTR)get(MUIA_Numeric_Format,NULL)); };
  50.         void Max(const LONG p) { set(MUIA_Numeric_Max,(ULONG)p); };
  51.         LONG Max() const { return((LONG)get(MUIA_Numeric_Max,0L)); };
  52.         void Min(const LONG p) { set(MUIA_Numeric_Min,(ULONG)p); };
  53.         LONG Min() const { return((LONG)get(MUIA_Numeric_Min,0L)); };
  54.         void Reverse(const BOOL p) { set(MUIA_Numeric_Reverse,(ULONG)p); };
  55.         BOOL Reverse() const { return((BOOL)get(MUIA_Numeric_Reverse,FALSE)); };
  56.         void RevLeftRight(const BOOL p) { set(MUIA_Numeric_RevLeftRight,(ULONG)p); };
  57.         BOOL RevLeftRight() const { return((BOOL)get(MUIA_Numeric_RevLeftRight,FALSE)); };
  58.         void RevUpDown(const BOOL p) { set(MUIA_Numeric_RevUpDown,(ULONG)p); };
  59.         BOOL RevUpDown() const { return((BOOL)get(MUIA_Numeric_RevUpDown,FALSE)); };
  60.         void Value(const LONG p) { set(MUIA_Numeric_Value,(ULONG)p); };
  61.         LONG Value() const { return((LONG)get(MUIA_Numeric_Value,0L)); };
  62.         void Decrease(LONG p) { dom(MUIM_Numeric_Decrease,(ULONG)p); };
  63.         void Increase(LONG p) { dom(MUIM_Numeric_Increase,(ULONG)p); };
  64.         LONG ScaleToValue(LONG p1, LONG p2, LONG p3) { return((LONG)dom(MUIM_Numeric_ScaleToValue,(ULONG)p1,(ULONG)p2,(ULONG)p3)); };
  65.         void SetDefault() { dom(MUIM_Numeric_SetDefault); };
  66.         STRPTR Stringify(LONG p) { return((STRPTR)dom(MUIM_Numeric_Stringify,(ULONG)p)); };
  67.         LONG ValueToScale(LONG p1, LONG p2) { return((LONG)dom(MUIM_Numeric_ValueToScale,(ULONG)p1,(ULONG)p2)); };
  68.     };
  69.  
  70. #endif
  71.